public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            //System.out.println(new StringBuilder(str).reverse());
            System.out.println(reverse(str));
        }
        sc.close();
    }
    
    public static String reverse(String s){
        char[] array = s.toCharArray();
        int i = 0, j = array.length-1;
        while(i < j){
            char temp = array[i];
            array[i] = array[j];
            array[j] = temp;
            i++;
            j--;
        }
        return new String(array);
    }
}